import i18n from '@app-base/common/utils/i18next';
import { ENTITY_TYPE_FACE, NMMeshBaseCommand } from '@app-nextmesh/types';
import BaseCollectionDialog from './BaseCollection';
import { schema } from './jsonSchema';

const CollectionType = 'Surface';
export const cmdSurface: NMMeshBaseCommand = {
  id: 'cmdSurface',
  label: 'command.collection.surface',
  icon: 'commands/simu/surfaces',
  create: (label, onClose, _, customParams) => (
    <BaseCollectionDialog
      title={i18n.t(label)}
      onClose={onClose}
      params={customParams}
      pickTypes={[ENTITY_TYPE_FACE]}
      collectionType={CollectionType}
      schema={schema}
    />
  ),
};
